Erik Kusch, PhD Student
Department of Biology
Section for Ecoinformatics & Biodiversity
Center for Biodiversity Dynamics in a Changing World (BIOCHANGE)
Aarhus University
26/02/2021
[Study Group] Bayesian Statistics with the Rethinking Material 1
26/02/2021
[Study Group] Bayesian Statistics with the Rethinking Material 2
Benefits:
Unaffected by dimensionality (others methods
relying on optimisation fail in high-dimensionality
settings)
Accommodates continuous and discrete
variables
Downsides:
Chain-length needs to be sufficiently long for
convergence
26/02/2021
[Study Group] Bayesian Statistics with the Rethinking Material 3
Guess & Check Algorithms.
Problems:
Relying on “sensible”
proposition distributions
Get stuck in high-
dimensionality problems
Mode (which Guess & Check
converges on) often far from
probability density
concentration
High-dimensions spaces are
concentrated
26/02/2021
[Study Group] Bayesian Statistics with the Rethinking Material 4
Theory:
Parameter state
represented as randomly-
moving particle on a
frictionless surface
Frictionless surface is
log-posterior
Known as HMC
Implemented via ulam()
Gradient-based Algorithm.
Benefits:
Doesn’t get stuck
Provides diagnostics
Downsides:
Requires more information
(i.e. gradient, mass of particle,
number of leaps per trajectory,
size of leaps)
Requires tuning!
26/02/2021
[Study Group] Bayesian Statistics with the Rethinking Material 5
How we inspect ulam() objects:
precis() = parameter estimates and diagnostics
show() = chain sampling time, model formula
pairs() = shapes of parameter posterior
distributions, and their correlations which each
other
traceplot() = trace plot of chains and samples in
sequential order
trankplot() = trank plot of ranked samples
extract.samples() = extracts samples from chains
after warmup has finished
26/02/2021
[Study Group] Bayesian Statistics with the Rethinking Material 6
Bad! Good!
Outliers in chains
No stationarity
Not much mixing
Convergence is “meh”
Histograms don’t mix
well
N_eff low (applicable
for above plot, too)
Stationarity
Mixing
Convergence
Histograms mix well
N_eff high (applicable
for above plot, too)
Issue solved with informative priors!
26/02/2021
[Study Group] Bayesian Statistics with the Rethinking Material 7
Bad! Good!
No stationarity
Not much mixing
Convergence is “meh”
Histograms don’t mix
well
N_eff low (applicable
for above plot, too)
Stationarity
Mixing
Convergence
Histograms mix well
N_eff high (applicable
for above plot, too)
Issue solved with informative priors!